package com.Test;

/**
 * @author ZhaoDong
 * @date 2022/11/1 17:47
 * @description leetcode
 */
public class TestThreadLocal {
    public static void main(String[] args) {
        ThreadLocal<Integer> t1 = ThreadLocal.withInitial(() -> 1);
        System.out.println(t1.get());
        ThreadLocal<Integer> t2 = ThreadLocal.withInitial(() -> 2);
        System.out.println(t2.get());
    }
}
